package com.mdlib.helper.ui.fragments.sect.money;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;

import com.ljlib.core.util.EmptyUtils;
import com.ljlib.help.R;
import com.mdlib.helper.base.BaseTitleFragment;

/**
 * 作者：HQY on 16/11/22 13:52
 * 邮箱：hqy_xz@126.com
 */

public class Payfragment extends BaseTitleFragment {

    private static final String BUS_ID = "bus_id";

    private String busId = "";

    public static Payfragment newInstance(String busId) {
        Payfragment fragment = new Payfragment();
        Bundle bundle = new Bundle();
        bundle.putString(BUS_ID, busId);
        fragment.setArguments(bundle);
        return fragment;
    }

    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        if (EmptyUtils.isEmpty(getArguments())) {
            removeFragment();
        }
        busId = getArguments().getString(BUS_ID);

    }

    @Override
    protected int getContentLayoutId() {
        return R.layout.fragment_pay;
    }

    @Override
    protected void initView(View rootView) {
        super.initView(rootView);
        setTitle(R.string.order_confrom_title, R.color.white)
                .setTitleBgColor(R.color.generic_view_bg)
                .setImgLeftListener(new View.OnClickListener() {
                    @Override
                    public void onClick(View v) {
                        removeFragment();
                    }
                });
    }
}
